home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / garfield.swf / scripts / DefineSprite_312_england_helper / frame_1 / DoAction.as
Encoding:
Text File  |  2010-04-12  |  700 b   |  38 lines

  1. function check_ball()
  2. {
  3.    if(Math.abs(_parent.ball_mov._x - (this._x + 37)) < 300)
  4.    {
  5.       return true;
  6.    }
  7.    return false;
  8. }
  9. function play_ball()
  10. {
  11.    if(Math.abs(_parent.ball_mov._x - (this._x + 84)) < 80)
  12.    {
  13.       gotoAndStop("move_ball");
  14.       play();
  15.    }
  16.    else if(_parent.ball_mov._x > this._x + 67)
  17.    {
  18.       gotoAndStop("move_forward");
  19.       play();
  20.    }
  21.    else
  22.    {
  23.       gotoAndStop("move_backward");
  24.       play();
  25.    }
  26. }
  27. function c_check()
  28. {
  29.    if(_root.last_bounce != 101 && _root.no_bounce != true)
  30.    {
  31.       _root.control_mov.bounce_helper();
  32.       _root.last_bounce = 101;
  33.    }
  34. }
  35. var first_time = true;
  36. hit_mov._visible = 0;
  37. stop();
  38.